﻿using Swimj.DomainLib.Entities;

namespace BaseData.DomainLib.AggregatesModel.SaleOrderAggregate;

public class SaleOrderDetail : AuditableEntity<int>
{

    public int SaleOrderId { get; set; }

    /// <summary>
    /// 所属物料
    /// </summary>
    public int MaterialId { get; set; }

    /// <summary>
    /// 不含税单价
    /// </summary>
    public decimal ExcludingTaxPrice { get; set; }

    /// <summary>
    /// 含税单价
    /// </summary>
    public decimal IncludingTaxPrice { get; set; }

    /// <summary>
    /// 税率
    /// </summary>
    public decimal Tax { get; set; }

    /// <summary>
    /// 数量
    /// </summary>
    public decimal Quantity { get; set; }

    /// <summary>
    /// 
    /// </summary>
    public DateTime? DeliveryTime { get; set; }

    public SaleOrderDetail(int materialId, decimal excludingTaxPrice, decimal includingTaxPrice,
        decimal tax, decimal quantity, DateTime? deliveryTime)
    {
        MaterialId = materialId;
        DeliveryTime = deliveryTime;
        ExcludingTaxPrice = excludingTaxPrice;
        IncludingTaxPrice = includingTaxPrice;
        Tax = tax;
        Quantity = quantity;
    }

}